﻿namespace WatiNSahi.Extensions
{
    using WatiN.Core;
    using WatiN.Core.Native;

    [ElementTag("th")]
    public class TableHeader : ElementContainer<TableHeader>
    {
        public TableHeader(DomContainer domContainer, INativeElement nativeElement)
            : base(domContainer, nativeElement)
        {
        }

        public TableHeader(DomContainer domContainer, ElementFinder elementFinder)
            : base(domContainer, elementFinder)
        {
        }

        public TableHeaderCollection Items
        {
            get
            {
                return new TableHeaderCollection(DomContainer, CreateElementFinder<TableHeader>(
                 delegate(INativeElement nativeElement)
                 {
                     return nativeElement.Children;
                 }, null));
            }
        }
    }
}